package cn.lili.modules.message.entity.enums;

import cn.hutool.core.text.CharSequenceUtil;

/**
 * 消息编码枚举
 *
 * @author pikachu
 * @since 2020/12/8 9:46
 */
public enum NoticeMessageNodeEnum {

    /**
     * 订单
     */
    ORDER_CREATE_SUCCESS("订单提交成功通知", "Notice of Successfully Place an Order"),
    ORDER_CANCEL_SUCCESS("订单取消成功通知", "Notice of Successfully Cancel an Order"),
    ORDER_PAY_SUCCESS("订单支付成功通知", "Notice of Order Payment Success"),
    ORDER_PAY_ERROR("支付失败自动退款通知", "Notice of Automatic Refund of Payment Failure"),
    ORDER_DELIVER("订单发货通知", "Notice of Order Shipped"),
    ORDER_COMPLETE("订单完成通知", "Notice of Order Completed"),
    ORDER_EVALUATION("订单评价提醒", "Notice of Writing a Review"),

    /**
     * 售后
     */
    AFTER_SALE_CREATE_SUCCESS("售后提交成功通知", "Notice of Successful Submission of After-Sales Application"),
    RETURN_GOODS_PASS("退货退款审核通过通知", "Notice of Approval of Return and Refund Application"),
    RETURN_MONEY_PASS("退款审核通过通知", "Notice of Approval of Refund Application"),
    RETURN_GOODS_REFUSE("退货退款审核未通过通知", "Notice of Rejection of Return and Refund Application"),
    RETURN_MONEY_REFUSE("退款审核未通过通知", "Notice of Rejection of Refund Application"),
    AFTER_SALE_ROG_PASS("退货退款物品签收通知", "Notice of Receipt for Return and Refund Items"),
    AFTER_SALE_ROG_REFUSE("退货退款物品拒收通知", "Notice of Receipt Rejection for Return and Refund Items"),
    AFTER_SALE_COMPLETE("售后完成通知", "Notice of Completion of After-Sales Service"),


    /**
     * 拼团
     */
    PINTUAN_CREATE("开团成功通知", ""),
    PINTUAN_ERROR("拼团失败通知", ""),
    PINTUAN_SUCCESS("拼团成功通知", ""),

    /**
     * 积分
     */
    POINT_CHANGE("积分变更通知", "Notice of Shopping Points Change"),

    /**
     * 用户余额
     */
    WALLET_CHANGE("余额账户变更通知", ""),
    WALLET_WITHDRAWAL_CREATE("余额提现申请提交成功通知", ""),
    WALLET_WITHDRAWAL_SUCCESS("余额提现成功通知", ""),
    WALLET_WITHDRAWAL_ERROR("余额提现申请失败通知", ""),
    WALLET_WITHDRAWAL_AUDIT_ERROR("余额提现申请驳回通知", ""),
    WALLET_WITHDRAWAL_AUDIT_SUCCESS("余额提现申请通过通知", "");



    private final String description;
    private final String descriptionEnglish;

    NoticeMessageNodeEnum(String description, String descriptionEnglish) {
        this.description = description;
        this.descriptionEnglish = descriptionEnglish;
    }

    public String getDescription() {
        if (CharSequenceUtil.isNotBlank(this.descriptionEnglish)) {
            return this.descriptionEnglish;
        }
        return description;
    }

    public String description() {
        if (CharSequenceUtil.isNotBlank(this.descriptionEnglish)) {
            return this.descriptionEnglish;
        }
        return this.description;
    }


}
